CREATE TABLE [dbo].[tb_ValoresCampoDeDocumento]
(
[idValorCampoFormulario] [int] NOT NULL IDENTITY(1, 1),
[Documento] [int] NOT NULL,
[CampoDeFormulario] [int] NOT NULL,
[Valor] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EsNulo] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ValoresCampoDeDocumento] ADD CONSTRAINT [PK_tb_ValoresCampoDeDocumento] PRIMARY KEY NONCLUSTERED  ([idValorCampoFormulario]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ValoresCampoDeDocumento] WITH NOCHECK ADD CONSTRAINT [FK_tb_ValoresCampoDeDocumento_tb_CamposDeFormulario] FOREIGN KEY ([CampoDeFormulario]) REFERENCES [dbo].[tb_CamposDeFormulario] ([idCampoDeFormulario])
GO
ALTER TABLE [dbo].[tb_ValoresCampoDeDocumento] ADD CONSTRAINT [FK_tb_ValoresCampoDeDocumento_tb_Documentos] FOREIGN KEY ([Documento]) REFERENCES [dbo].[tb_Documentos] ([idDocumento])
GO
